import sun.misc.PostVMInitHook;

import java.util.Scanner;


public class Test {

    //递归
    // 输出整数每一位  求和   斐波那锲数列
    public static void main1(String[] args) {//递归输出整数每一位
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        Fun(n);
    }
    public static void Fun(int n) {
        if(n<=9)
        {
            System.out.println(n);
            return;
        }
        else
        {
            Fun(n / 10);
            System.out.println(n % 10);
        }
    }

    public static void main2(String[] args) {//求和
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int ret=Fun1(n);
        System.out.println(ret);
    }

    public static int Fun1(int n) {
        if(n==1)
        {
            return 1;
        }
        else
        {
            return n+Fun1(n-1);
        }
    }


    public static void main3(String[] args) {//
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int ret=Fun2(n);
        System.out.println(ret);
    }
    public static int Fun2(int n) {
        if(n<=9)
        {
            return n;
        }
        else
        {
            return n%10+Fun2(n/10);
        }
    }


    public static void main(String[] args) {//斐波那锲数列
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int ret=Fan2(n);
        System.out.println(ret);
    }

    public static int Fan2(int n) {
        if(n==1||n==2)
        {
            return 1;
        }
        else
        {
            return Fan2(n-1)+Fan2(n-2);
        }
    }
}
